#pragma once

#include "CmdHandler3.h"

class DXFHandler : public CmdHandler3
{
	Q_OBJECT
public:
	Q_INVOKABLE DXFHandler();
	~DXFHandler();

	virtual void input(const QVariant& data, const QString& rawInput, CommandSource cs) override;
	bool openDxfFile();
	bool openDxfFile(const QString& fileName);
private:
	osg::Vec3d m_basePt;
	osg::Vec3d m_insertPt;
	double m_angle = 0;
	double m_scale = 1.0;
	std::set<std::shared_ptr<INode>> m_nodes;
};

class DXF3Handler : public CmdHandler3
{
	Q_OBJECT
public:
	Q_INVOKABLE DXF3Handler();
	~DXF3Handler();

	virtual void input(const QVariant& data, const QString& rawInput, CommandSource cs) override;
	bool openDxfFile();
	bool openDxfFile(const QString& fileName);
private:
	osg::Vec3d m_basePt;
	osg::Vec3d m_insertPt;
	double m_scale = 1.0;
	std::set<std::shared_ptr<INode>> m_nodes;
};
